<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>花枝 - 与高颜主播视频聊天</title>
    <meta name="viewport"
          content="width=device-width, initial-scale=1, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="msapplication-tap-highlight" content="no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="format-detection" content="telephone=no">
    <meta content="email=no" name="format-detection">
    <link rel="stylesheet" href="./css/swiper.css">
    <link rel="stylesheet" href="./css/app.css">
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/main.css">
    <script src="./js/jquery-2.1.2.min.js"></script>
    <script type="text/javascript" src="./js/jquery_params.js"></script>
    <script src="./js/swiper.js"></script>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            document.documentElement.style.fontSize =
                Math.floor(
                    Math.min(Math.max(
                        document.body.clientWidth,
                        document.documentElement.clientWidth
                    ), 750) / 7.5
                ) + "px";
        }, false);
    </script>

    <script type="text/javascript" src="//bq3l.t4m.cn/applink.js"></script>
    <style id="tsbrowser_video_independent_player_style" type="text/css">
        [tsbrowser_force_max_size] {
            width: 100% !important;
            height: 100% !important;
            left: 0 !important;
            top: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            transform: none !important;
        }

        [tsbrowser_force_fixed] {
            position: fixed !important;
            z-index: 9999 !important;
            background: black !important;
        }

        [tsbrowser_force_hidden] {
            opacity: 0 !important;
            z-index: 0 !important;
        }

        [tsbrowser_hide_scrollbar] {
            overflow: hidden !important;
        }

        [tsbrowser_display_none] {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }

        [tsbrowser_force_show] {
            display: block !important;
            visibility: visible !important;
            opacity: 0;
        }
    </style>
</head>

<body style="">
<div id="app" class="swiper-container swiper-container-vertical swiper-container-android">
    <div class="top-part">
        <img src="https://pic.rmb.bdstatic.com/bjh/27c7357532381394d5cf850a68ce9e3e.png" alt="">
        <a class="head_link" onclick="dl()">下载花枝</a>
        <div class="line"></div>
    </div>
    <div class="swiper-wrapper" style="transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;">
        <div class="swiper-slide swiper-slide-active" style="height: 640px;">
            <img src="https://pic.iask.cn/fimg/387223381018.jpg" alt="" class="bgGif">
            <div class="mask">
                <img class="onetitle" src="https://pic.rmb.bdstatic.com/bjh/6e97e86f628564a295193b8e0784b2a1.png"
                     alt="">
                <a class="btndown down">下载花枝</a>
            </div>
            <img class="next" src="https://pic.rmb.bdstatic.com/bjh/6331594cb62479222d48ddbf08345208.png"
                 alt="">
        </div>
        <div class="swiper-slide two swiper-slide-next" style="height: 640px;">
            <img class="twoimg1" id="twoimg1"
                 src="https://pic.rmb.bdstatic.com/bjh/be0ca866f68a632991013031ee7f8bfb.png" alt=""
                 style="top: 3.18rem;">
            <img class="twoimg2" id="twoimg2"
                 src="https://pic.rmb.bdstatic.com/bjh/6ee14163d9cda9cc2f66430526a7783d.png" alt=""
                 style="top: 3.39rem;">
            <p class="twotitle1">高颜值 视频社交</p>
            <p class="twotitle2">与网红大V亲密接触</p>
            <a class="btndown down">下载花枝</a>
            <img class="next" src="https://pic.rmb.bdstatic.com/bjh/6331594cb62479222d48ddbf08345208.png"
                 alt="">
        </div>
        <div class="swiper-slide three" style="height: 640px;">
            <p class="threetitle1">
                海量网红模特
                <br>任你挑
            </p>
            <p class="threetitle2">颜值电台真人互动更真实</p>
            <a class="btndown down">下载花枝</a>
            <div class="threeimg">
                <img class="threeimg1" src="https://pic.rmb.bdstatic.com/bjh/28302c7a48d3e6db0297bedc31084839.png"
                     alt="">
                <img class="threeqimao1 animb1"
                     src="https://pic.rmb.bdstatic.com/bjh/7f462d13e16f6e82d7c40061c032a024.png" alt="">
                <img class="threeqimao2 animb2"
                     src="https://pic.rmb.bdstatic.com/bjh/fc4be008dc1831b07e13430bbed503f5.png" alt="">
                <img class="threeqimao3 animb3"
                     src="https://pic.rmb.bdstatic.com/bjh/9b5d0e22cab8b852eabe8db63cedf6b4.png" alt="">
            </div>
            <img class="next" src="https://pic.rmb.bdstatic.com/bjh/6331594cb62479222d48ddbf08345208.png" alt="">
        </div>
        <div class="swiper-slide" style="height: 640px;"><img
                src="https://pic.iask.cn/fimg/387223381018.jpg"
                alt="" class="bgGif">
            <div class="mask">
                <img class="fourlogo" src="https://pic.rmb.bdstatic.com/bjh/a2ce4d534220edf5c81623258f1a449e.png"
                     alt="">
                <a class="btndown down">下载花枝</a>
            </div>
        </div>
    </div>
    <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
    <div class="copyright">
        <!--        <p>福建省捷盛网络科技有限公司</p>-->
        <!--        <p>-->
        <!--            <a href="http://www.beian.miit.gov.cn/" target="_blank">闽ICP备19016004号-1 </a>-->
        <!--            |-->
        <!--            粤网文〔2018〕8623-3093号-->
        <!--        </p>-->
    </div>
</div>

<div id="tipsdown" class="tipsdown">
    <img src="https://pic.rmb.bdstatic.com/bjh/eae01dcb98b3fbc5fb32f47e13492ee4.png" alt="">
</div>
<div class="wechat"></div>
<script type="text/javascript" src="./js/main.js"></script>
<script src="./js/version-3.2.8.js"></script>
<script src="./js/base64.min.js"></script>
<script type="text/javascript">
    // 判断是否是微信打开
    MLV.sysTemInfo();
    MLV.down();
    // ----------------------判断是否显示下载按钮---------------开始-----------------------------
    var accountId = $.query.get("account_id");

    var downloadUrl = "";

    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        console.log(r);
        if (r != null) return unescape(r[2]);
        return null; //返回参数值
    }

    function isNumber(val) {
        var regPos = /^\d+(\.\d+)?$/; //非负浮点数
        var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
        if (regPos.test(val) || regNeg.test(val)) {
            return true;
        } else {
            return false;
        }
    }

    function isAndroid() {
        var u = navigator.userAgent;
        return u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
    }

    var u = navigator.appVersion;
    var wx = ((u.match(/MicroMessenger/i)) && (u.match(/MicroMessenger/i).toString().toLowerCase() == 'micromessenger'));

    var showbtn = function (isshow) {
        if (isshow) {
            $(".btndown").show();
            $(".head_link").show();
        } else {
            $(".btndown").hide();
            $(".head_link").hide();
        }
    }


    if (!isNumber(accountId) && isAndroid()) {
        downloadUrl = "http://huazhizl.wanaiyijia.cn:9786/" + accountId + "/"
        showbtn(true);
    } else {
        showbtn(false);
        downloadUrl = "http://huazhizl.wanaiyijia.cn:9786/default_1/"
        if (!wx) {
            MobLink({
                el: '',
                path: 'demo/a',
                params: {
                    uniteId: '0af17a6b6c6d6',
                    account_id: accountId
                }
            })
        }
    }

    // ----------------------判断是否显示下载按钮---------------结束-----------------------------
</script>

<!--// 日志打印工具-->
<!--<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>-->
<script src="./js/axios.min.js"></script>
<script type="text/javascript">
    // 初始化日志打印工具 vConsole;
    // var vConsole = new VConsole();
    // ---------------------收集设备信息-----------开始-----------------------
    //获取初始信息
    var app = navigator.appVersion;
    //根据括号进行分割
    var left = app.indexOf('(');
    var right = app.indexOf(')');
    var str = app.substring(left + 1, right);

    var Str = str.split(";");
    //手机型号--苹果 iPhone
    var Mobile_Iphone = Str[0];
    //手机型号--安卓
    var Mobile_Android = Str[2];
    // 红米手机等特殊型号处理 匹配字符
    var res = /Android/;
    var reslut = res.test(Mobile_Android);
    //设备
    var equipment = '';
    //系统
    var system_moble = '';
    console.log(Str);
    var trimLeft = function (s) {
        if (s == null) {
            return "";
        }
        var whitespace = new String(" \t\n\r");
        var str = new String(s);
        if (whitespace.indexOf(str.charAt(0)) != -1) {
            var j = 0, i = str.length;
            while (j < i && whitespace.indexOf(str.charAt(j)) != -1) {
                j++;
            }
            str = str.substring(j, i);
        }
        return str;
    }

    function trim(str) { //删除左右两端的空格
        return str.replace(/(^\s*)|(\s*$)/g, "");
    }

    //根据设备型号判断设备系统
    if (Mobile_Iphone.indexOf('iPhone') >= 0) {
        equipment = 'iPhone';
        system_moble = trim(Str[1].substring(4, Str[1].indexOf('like')));
    } else if (Mobile_Iphone == 'Linux') {
        if (reslut) {
            equipment = 'Android';
            system_moble = trimLeft(Str[2]);
        } else {
            equipment = 'Android';
            system_moble = trimLeft(Str[1]);
        }
    }


    var toSigin = function (data) {
        // // 先用Object内置类的keys方法获取要排序对象的属性名数组，再利用Array的sort方法进行排序
        // var newkey = Object.keys(data).sort()
        // console.log('newkey=' + newkey)
        var newkey = Object.keys(data);
        var newObj = '' // 创建一个新的对象，用于存放排好序的键值对
        for (var i = 0; i < newkey.length; i++) {
            // 遍历newkey数组
            newObj += [newkey[i]] + '=' + data[newkey[i]] + '&'
        }
        return newObj.substring(0, newObj.length - 1);
    }

    var parma = {
        account_id: accountId, // 邀请人id
        phone_type: equipment, // 设备类型（android 还是 ios)
        system_version: trim(system_moble),
    }
    console.log(parma)
    var sigin = Base64.encode(encodeURI(toSigin(parma)));

    // 正式服 http://api.mulancloud.com:6601
    // 正式服IP http://121.43.128.218:6601
    // 正式服 https https://lapi.mulancloud.com:442
    // 测试服 http://114.55.165.189:8860


    function on_click_collect_data() {
        axios.get("/api", {
            params: {
                param: sigin
            }
        }).then(res => {
            console.log("-------------axios 3---------------------")
            console.log(res.data);
        }).catch(res => {
            console.log("---------------axios 3 ennor------------------------------")
            console.log(res);
        })

    }

    on_click_collect_data();
    // ---------------------收集设备信息-----------结束-----------------------

</script>
<script type="text/javascript">
</script>
<script src="https://public.szsyskj.cn/union/script/landing?_env=release"></script>
<script type="text/javascript" src="//res.cdn.openinstall.io/openinstall.js"></script>
<script src="./js/action.js?_1619079528"></script>

<script>
    var swiper = new Swiper('.swiper-container', {
        direction: 'vertical'
    });

    function $id(id) {
        return document.getElementById(id)
    }

    swiper.on('slideChange', function (options) {
        if (swiper.previousIndex === 1) {
            var img1 = $id('twoimg1');
            var img2 = $id('twoimg2');
            img1.style.top = '3.18rem';
            img2.style.top = '3.39rem';
            img1.style.transition = '';
            img2.style.transition = '';
        }
        if (swiper.activeIndex === 1) {
            var img1 = $id('twoimg1');
            var img2 = $id('twoimg2');
            img1.style.top = '2.18rem';
            img2.style.top = '0.39rem';
            img1.style.transition = 'top 1.4s';
            img2.style.transition = 'top 1.2s';
        }
    });

    // ---------------------控制下载按钮-------开始----------------------------------
    function dl() {
        // TODO 下载方式
        //     ApKit.config = {
        //         download_director_url: '/' + (new Date()).valueOf().toString() + '/eden/n/down/',
        //         download_alternate_url_android: downloadUrl,
        //         wait_download_parameter_timeout_microseconds: 7 * 1000,
        //     }
        //     smartDownload();
        download();
    }

    function download() {
        console.log(downloadUrl);
        var a = document.createElement('a');
        a.href = downloadUrl;
        a.target = '_blank';
        a.id = 'exppub';
        document.body.appendChild(a);
        var alink = document.getElementById('exppub');
        alink.click();
        alink.parentNode.removeChild(a);
        // window.open(downloadUrl, "_self");
        // window.location.href = downloadUrl;
    }

    var u = navigator.appVersion;

    $('.btndown').bind('click', download);
    // ---------------------控制下载按钮-------结束----------------------------------
</script>
<script src="./js/xback.js"></script>
<script type="text/javascript">
    /*
    *   监听关闭按钮
    * */
    XBack.listen(function () {
        close_page();
    });

    function close_page() {
        var userAgent = navigator.userAgent;
        if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Chrome") != -1) {
            window.history.back();
            closeWindow();
            window.close();
            console.log("执行了1")
        } else if (userAgent.indexOf('Android') > -1 || userAgent.indexOf('Linux') > -1) {
            window.history.back();
            closeWindow();
            window.close();
            console.log("执行了2")
        } else {
            window.opener = null;
            closeWindow();
            window.close();
            console.log("执行了3")
        }
    }

    function closeWindow() {
        setTimeout(new function () {
            window.location.replace("");
        }, 0);
    }


</script>


<div style="display:none">
    <script src="./js/zstat.js?id=3998212&web_id=3998212"></script>
</div>
</body>
</html>
